package com.clpms.bean.enumBean;

/**
 * @author caixinyong
 * @date 2023/5/12 3:27 PM
 */

public enum EasyTypeEnum {
	WEI_ZHI(0, "未知"),
	HEN_RONG_YI(1, "很容易"),
	RONG_YI(2, "容易"),
	ZHONG_DENG(3, "中等"),
	NAN(4, "难"),
	HEN_MAN(5, "很难"),

	;


	private final Integer code;
	private final String desc;


	public Integer getCode() {
		return this.code;
	}

	public String getDesc() {
		return this.desc;
	}

	private EasyTypeEnum(Integer code, String desc) {
		this.code = code;
		this.desc = desc;
	}

	public static Integer getCodeByDesc(String desc) {
		for (EasyTypeEnum status : EasyTypeEnum.values()) {
			if (status.getDesc().equals(desc)) {
				return status.getCode();
			}
		}
		return 0;
	}
}
